#ifndef CONNECTION_H
#define CONNECTION_H



#include "proto/messages_robocup_ssl_detection.pb.h"
#include "proto/grSim_Commands.pb.h"
#include "proto/grSim_Packet.pb.h"
#include "proto/grSim_Replacement.pb.h"
#include "proto/netraw.h"


using namespace std;

class connection {
public:
    connection();
    ~connection();
    void setTimeStamp(float);
    void setWheel1(float);
    void setWheel2(float);
    void setWheel3(float);
    void setWheel4(float);
    void setKickSpeedx(float);
    void setKickSpeedz(float);
    void setvelx(float);
    void setvely(float);
    void setvelz(float);
    void setspin(bool);
    void setteam(bool);
    void setport(int);
    void setip(string);
    void setid(int);
    void send();
    bool conectar();
    void desconectar();
    bool isconect();

private:
    Net::UDP udpsocket;
    Net::Address _addr;
    string ip;
    int port;
    int id_;
    float timeStamp, wheel1, wheel2, wheel3, wheel4, kickspeedx, kickspeedz, velx, vely, velz;
    bool spinner,teamYellow;
    char* buffer2;

};



#endif // CONNECTION_H
